import Request from "../core";

export const getModuleInfo = (data, pid = uni.getStorageSync("pageId")) => {
  return Request.get(`/marketing/lowCode/h5/getModuleById?pageId=${pid}`, data);
};

export const uploadImage = (file) => {
  const businessId = uni.getStorageSync("businessId") || 39;
  return Request.upload(
    `/marketing/from/upload?businessId=${businessId}`,
    null,
    null,
    null,
    file
  );
};

export const getWxAppQrcode = (data) => {
  return Request.get(`/marketing/lowCode/h5/getWxappQrcode`, data);
};

export default {
  getModuleInfo,
  uploadImage,
};
